<template>
  <p-table
    :columns="columns"
    :dataSource="tableData"
    :pagination="false"
    size="middle"
    row-key="id"
    bordered
  >
    <template slot="action" slot-scope="text, record">
      <p-popconfirm title="确定要删除吗?" @confirm="move(record, index)">
        <a>迁出</a>
      </p-popconfirm>
    </template>
  </p-table>
</template>

<script>
import mixins from './list-mixins'

export default {
  mixins: [mixins],
  data() {
    return {
      columns: [
        {
          title: '序号',
          dataIndex: 'rowIndex',
          align: 'center',
          width: 50,
          customRender(text, record, index) {
            return index + 1
          }
        },
        {
          title: '线体',
          dataIndex: 'lineName',
          align: 'center',
        },
        {
          title: '工站',
          dataIndex: 'stationName',
          align: 'center',
        },
        {
          title: '排班人员',
          dataIndex: 'scheduleName',
          align: 'center',
        },
        {
          title: '上岗人员',
          dataIndex: 'onDutyName',
          align: 'center',
        },
        {
          title: '匹配结果',
          dataIndex: 'matchResult',
          align: 'center',
        },
        {
          title: '上岗时间',
          dataIndex: 'onDutyTime',
          align: 'center',
        },
        {
          title: '迁出时间',
          dataIndex: 'moveOutTime',
          align: 'center',
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: {
            customRender: 'action'
          }
        }
      ]
    }
  },
  created() {
    this.url = '/mes-manufacture/mfStartWork/getScheduleStaffInfo'
  },
  methods: {
    move(item) {

    }
  }
}
</script>
